#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <UIKit/UIKit.h>
#import <UIKit/CDStructures.h>
#import <UIKit/UIView.h>
#import <UIKit/UITable.h>
#import <UIKit/UITableCell.h>
#import <UIKit/UITextLabel.h>
#import <UIKit/UITransformAnimation.h>
#import <UIKit/UIAnimator.h>
#import "WebCore/WebFontCache.h"
#import "FDDefaultsController.h"
#import "common.h"

@interface NSObject (ScoreCardDelegateMethods)

- (void)validateScoring;

@end

@interface FDScoreCardView : UIView {
	
	id	delegate;
	
	struct CGRect				_contentRect;
	struct CGRect				_offScreenRect;
	struct CGRect				_onScreenRect;
	
	UITransformAnimation	*translate;
	UIAnimator				*animator;
	
	UITable				*_scoreCardTable;
	NSArray				*_scoreCardTitles;
	NSMutableArray		*_scoreCardEnabledFlags;
	NSMutableArray		*_scoreCardScores;
	FDDefaultsController	*defaults;
	
	BOOL	newCard;
	int	_aces;
	int _twos;
	int _threes;
	int _fours;
	int _fives;
	int _sixes;
	int _threeofakind;
	int _fourofakind;
	int _fullhouse;
	int _smallstraight;
	int _largestraight;
	int _yahtzee;
	int	_chance;
	int _yahtzeechips;
	int _uppersub;
	int _upperscore;
	int _lowerscore;
	int _upperbonus;
	int _grandtotal;
	int _yahtzeeCount;
}

- (void)createScoreCardTable;
- (void)scoreCardTitles;
- (void)reloadData;
- (void)clearScoreCard;

// ACCESSORS

- (int)selectedRow;
- (int)yahtzeecount;
- (void)setYahtzeecount:(int)newYahtzeecount;
- (void)clearSelection:(int)row;

- (int)aces;
- (void)setAces:(int)newAces;
- (int)twos;
- (void)setTwos:(int)newTwos;
- (int)threes;
- (void)setThrees:(int)newThrees;
- (int)fours;
- (void)setFours:(int)newFours;
- (int)fives;
- (void)setFives:(int)newFives;
- (int)sixes;
- (void)setSixes:(int)newSixes;
- (int)threeofakind;
- (void)setThreeofakind:(int)newThreeofakind;
- (int)fourofakind;
- (void)setFourofakind:(int)newFourofakind;
- (int)fullhouse;
- (void)setFullhouse:(int)newFullhouse;
- (int)smallstraight;
- (void)setSmallstraight:(int)newSmallstraight;
- (int)largestraight;
- (void)setLargestraight:(int)newLargestraight;
- (int)yahtzee;
- (void)setYahtzee:(int)newYahtzee;
- (int)chance;
- (void)setChance:(int)newChance;
- (int)yahtzeechips;
- (void)setYahtzeechips:(int)newYahtzeechips;
- (int)uppersub;
- (void)setUppersub:(int)newUppersub;
- (int)upperscore;
- (void)setUpperscore:(int)newUpperscore;
- (int)lowerscore;
- (void)setLowerscore:(int)newLowerscore;
- (int)upperbonus;
- (void)setUpperbonus:(int)newUpperbonus;
- (int)grandtotal;
- (void)setGrandtotal:(int)newGrandtotal;
- (void)setInactiveRow:(int)row;

#pragma mark Delegate
- (id)delegate;
- (void)setDelegate:(id)newDelegate;

@end